<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<link href="css/apps/variablesetting/gets.css" type="text/css" rel="stylesheet" />

<c:set var="gindex" value="0" />
<form  id="ProcessSettingForm">
<fieldset>
<legend>变量设置</legend>
<table id="vartable">
  <thead>
     <tr>
       <th>流程名</th>
       <th>变量标签[汉字]</th>
       <th>变量名</th>
       <th>变量值</th>
       <th>管理</th>
     </tr>     
  </thead>
  <tbody id="varbody">
      <c:forEach items="${beans}" var="item" varStatus="vs">
      <tr>
        <td>
           <input name="beans[${vs.index}].workflowName" value="${item.workflowName}"  readonly />
        </td>
        <td>
           <input name="beans[${vs.index}].label" value="${item.label}"  />
        </td>       
        
        <td>
           <input name="beans[${vs.index}].name" value="${item.name}"  />
        </td>
        
        <td>
           <input name="beans[${vs.index}].value" value="${item.value}"  />
        </td>
        <td>
           <img src="${sbase}/images/removeme.gif" onclick="removeRow(this);" />
        </td>
      </tr>
      <c:set var="gindex" value="${vs.index+1}" />
      </c:forEach>
  </tbody>
  <tfoot>
    <tr>
      <td colspan="4">
        <button type="button" id="saveBtn">保存</button>
        <button type="reset">重置</button>
        <button type="button" id="addvarBtn">添加变量</button>
      </td>
    </tr>
  </tfoot>
</table>
</fieldset>
</form>
<script type="text/javascript">
   var gindex = ${gindex};
   var workflow = '${workflowPk}'
</script>
<script src="scripts/apps/variablesetting/byworkflow.js" type="text/javascript"></script>